package com.yzt;

public class StringFan {
    public static void main(String[] args) {
/*        String str1 = "abc";
        String substring1 = str1.substring(2); // c
        String substring2 = str1.substring(0, 1);  // a
        String substring3 = str1.substring(1,2);    // b
        String concat1 = substring1.concat(substring3);
        System.out.println(concat1.concat(substring2));*/
        String str1 = "abcd";
         String result = "";
        for (int i = str1.length(); i > 0; i--) {
            char c = str1.charAt(i - 1);
            result = result + c;
        }
        System.out.println(result);
    }


    }


